import request from '@/utils/http'

/**
 * 获取自定义模块列表
 * @param params
 */
export function getCustomModuleList(params: any) {
	return request.get<Http.BaseResponse>({
		url: '/api/customModule',
		params: params
	})
}

/**
 * 创建自定义模块
 * @param params
 */
export function createCustomModule(params: any) {
	return request.post<Http.BaseResponse>({
		url: '/api/customModule',
		params: params,
		showSuccessMessage: true
	})
}

/**
 * 更新自定义模块
 * @param params
 */
export function updateCustomModule(params: any) {
	return request.put<Http.BaseResponse>({
		url: '/api/customModule',
		params: params,
		showSuccessMessage: true
	})
}

/**
 * 删除自定义模块
 * @param params
 */
export function deleteCustomModule(params: any) {
	return request.del<Http.BaseResponse>({
		url: '/api/customModule',
		params: params,
		showSuccessMessage: true
	})
}